<? startScript('jquery, jquery.tools'); ?><script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script><? endScript(); ?>

<form action="" method="post">

<fieldset><legend> <?=t('Render settings', 'cpn')?> </legend>

	<p><label><?=t("Thumbnails' path", 'cpn')?>
		<input type="text" name="path" class="wide" value="<?=hdat('settings', 'path')?>">
	</label></p>

	<p><label><?=t("Thumbnails' size", 'cpn')?>
		<input type="text" name="w" value="<?=hdat('settings', 'w')?>"> x <input type="text" name="h" value="<?=hdat('settings', 'h')?>">
	</label></p>

	<p><label><?=t("Show sections' headers as", 'cpn')?>
		<select name="show_headers" id="header-choice">
			<option value="0" <?=dat('settings', 'show_headers') ? '' : 'selected'?>><?=t('No headers', 'cpn')?></option>
			<option value="1" <?=(dat('settings', 'show_headers') == 1) ? 'selected' : ''?>>H1</option>
			<option value="2" <?=(dat('settings', 'show_headers') == 2) ? 'selected' : ''?>>H2</option>
			<option value="3" <?=(dat('settings', 'show_headers') == 3) ? 'selected' : ''?>>H3</option>
			<option value="4" <?=(dat('settings', 'show_headers') == 4) ? 'selected' : ''?>>H4</option>
			<option value="5" <?=(dat('settings', 'show_headers') == 5) ? 'selected' : ''?>>H5</option>
			<option value="6" <?=(dat('settings', 'show_headers') == 6) ? 'selected' : ''?>>H6</option>
			<option value="7" <?=(dat('settings', 'show_headers') == 7) ? 'selected' : ''?>><?=t('Custom formatting', 'cpn')?></option>
		</select>
	</label></p>

	<p class="custom-header"><label><?=t("Header custom format (available tags: {title}, {url} and {tip})", 'cpn')?>
		<input type="text" name="header_format" class="wide" value="<?=hdat('settings', 'header_format')?>">
	</label></p>
	
<? startScript('jquery'); ?><script type="text/javascript">
	$("#header-choice").change(function(){
		($(this).val() == 7) ? $(".custom-header").show() : $(".custom-header").hide();
	}).change();
</script><? endScript(); ?>	
	
	<p><label><input type="checkbox" name="clear" value="1" <?=(dat('settings', 'clear') == 1) ? 'checked' : ''?>> <?=t("Add a clearing tag to the sections' list", 'cpn')?></label></p>
	
</fieldset>

<fieldset><legend> <?=t('Static text settings', 'cpn')?> </legend>

	<ul class="jt-tabs"><?
	
		foreach($DATA['langs'] as $lang) {
			?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
		} 
		
	?></ul>
	
	<div class="jt-panes"><? $t = true; 
	
			foreach($DATA['langs'] as $lang) { $l = $lang['text'];
	
			?><div class="jt-pane" style="<?=$t ? 'display:block' : ''?>">
	
				<p><label><?=t('Sections block caption', 'cpn')?>
					<textarea name="caption[<?=$l?>]" class="wide"><?=dat('settings', 'data', $l, 'caption')?></textarea>
				</label></p>

			</div><? 
		
		$t = false; }
	
	?></div>

</fieldset>

	<p><input type="submit" name="editor_save" value="<?=ht('Save', 'cpn')?>" /></p>

</form>
